<?php
// On démarre la session (ceci est indispensable dans toutes les pages de notre section membre)
session_start ();
// On récupère nos variables de session
if (isset($_SESSION['login']) && isset($_SESSION['pwd'])) { 
?> 
 
	<html>
	<meta http-equiv="Content-type" content="text/html; charset=utf-8" /> 
	<link rel="stylesheet" href="css/skin/css3-buttons-grey.css" type="text/css"  media="screen">
	<link rel="stylesheet" href="css/css3-buttons.css" type="text/css"  media="screen">
	<link rel="stylesheet" href="css/mysheet.css" type="text/css"  media="screen">
	<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
	<script>
	    $(document).ready(function() {
	    
	        // Toggle the dropdown menu's
	        $(".dropdown .button").click(function () {
	            $(this).parent().find('.dropdown-slider').slideToggle('fast');
	            $(this).find('span.toggle').toggleClass('active');
	            return false;
	        });
	    
	    }); // END document.ready
	    
	    // Close open dropdown slider/s by clicking elsewhwere on page
	    $(document).bind('click', function (e) {
	        if (e.target.id != $('.dropdown').attr('class')) {
	            $('.dropdown-slider').slideUp();
	            $('span.toggle').removeClass('active');
	        }
	    }); // END document.bind
	</script>	
	
	<script>
	function tableHighlightRow() {
	  if (document.getElementById && document.createTextNode) {
	    var tables=document.getElementsByTagName('table');
	    for (var i=0;i<tables.length;i++)
	    {
	      if(tables[i].className=='hilite') {
	        var trs=tables[i].getElementsByTagName('tr');
	        for(var j=0;j<trs.length;j++)
	{
	          if(trs[j].parentNode.nodeName=='TBODY') {
	            trs[j].onmouseover=function(){this.className='hilight';return false}
	            trs[j].onmouseout=function(){this.className='';return false}
	          }
	        }
	      }
	    }
	  }
	}
	window.onload=function(){tableHighlightRow();}
	</script>
	
	
	<body>
	<header>
	<div class="right">
		<nav>
			<a href="accueil.php" class="button"><span class="icon icon16"></span></a>
		
			<a href="profil.php" class="button"><span class="icon icon14"></span></a>
			<a href="statistiques.php" class="button"><span class="icon icon66"></span></a>
			
			<a href="ajouterunepartie.php" class="button"><span class="icon icon1"></span></a>
			<a href="modifierunepartie.php" class="button"><span class="icon icon2"></span></a>
			<a href="supprimerunepartie.php" class="button"><span class="icon icon3"></span></a>
			
			<a href="sedeconnecter.php" class="button"><span class="icon icon30"></span></a>
			</nav>
	</div>
	</header>
	<?php
		$type = "spars"; // stat par
		$statsPar = array(0,1,4,18,32,21,14);
		$statsParSerialized = serialize($statsPar);
		echo "<img src=\"_genererGraphs.php?type=" . $type . "&tableauValeurs=" . $statsParSerialized ."\">";
		//echo "<img src=\"_genererGraphs.php?tableauValeurs=" . $statsParSerialized ."\">";
	
		$type = "sputts"; // stat par
		$statsPutt = array(0,10,65,15,0);
		$statsPuttSerialized = serialize($statsPutt);
		echo "<img src=\"_genererGraphs.php?type=" . $type . "&tableauValeurs=" . $statsPuttSerialized ."\">";
		//echo "<img src=\"_genererGraphs.php?tableauValeurs=" . $statsParSerialized ."\">";

	
	?>
	
		
	</body>
	</html>
<?php 
} // fin de la correspondance avec la session
else { 
      echo 'Les variables ne sont pas déclarées.';  
}  
?>